---
import BaseLayout from '../../layouts/BaseLayout.astro';

// 新闻数据库
const newsDatabase = {
    "evening-special-visit-2025": {
        title: "The Evening Special Visit 2025 spring",
        date: "March 06, 2025",
        image: "/img/top/movie_ttl2.png",
        content: `
            <h2>Experience the Magic of Kiyomizu-dera at Night</h2>
            <p>We are pleased to announce the Evening Special Visit for spring 2025, offering visitors a unique opportunity to experience the temple's serene beauty under the moonlight.</p>
            
            <h3>Event Details</h3>
            <ul>
                <li><strong>Period:</strong> March 15 - April 15, 2025</li>
                <li><strong>Time:</strong> 6:00 PM - 9:00 PM (Last admission: 8:30 PM)</li>
                <li><strong>Admission Fee:</strong> Adults ¥600, Children ¥300</li>
                <li><strong>Special Features:</strong> Illuminated temple grounds and cherry blossoms</li>
            </ul>
            
            <h3>What to Expect</h3>
            <p>During the evening visit, the temple grounds are beautifully illuminated, creating a mystical atmosphere that has captivated visitors for centuries. The famous wooden stage offers breathtaking views of Kyoto city lights, while the temple's architecture is highlighted against the night sky.</p>
            
            <p>Spring visitors will also have the opportunity to witness the cherry blossoms in full bloom, creating a spectacular contrast against the temple's traditional architecture.</p>
            
            <h3>Important Notes</h3>
            <ul>
                <li>Please dress warmly as evening temperatures can be cool</li>
                <li>Photography is permitted in designated areas only</li>
                <li>The event may be cancelled due to severe weather conditions</li>
                <li>Advance reservations are recommended during peak cherry blossom season</li>
            </ul>
            
            <p>For more information and reservations, please contact our visitor center or visit our official website.</p>
        `
    },
    "documentary-film-released": {
        title: "The documentary film \"Kiyomizu – Cycle of Blessings\" is released.",
        date: "February 03, 2025",
        image: "/img/top/movie_ttl2.png",
        content: `
            <h2>New Documentary Film Release</h2>
            <p>We are excited to announce the release of our new documentary film "Kiyomizu – Cycle of Blessings", which explores the rich history and spiritual significance of our temple.</p>
            
            <h3>About the Film</h3>
            <p>This documentary takes viewers on a journey through the seasons at Kiyomizu-dera, showcasing the temple's beauty throughout the year and the deep spiritual practices that have been maintained for over 1,200 years.</p>
            
            <h3>Screening Information</h3>
            <ul>
                <li><strong>Duration:</strong> 90 minutes</li>
                <li><strong>Language:</strong> Japanese with English subtitles</li>
                <li><strong>Director:</strong> Takeshi Yamamoto</li>
                <li><strong>Release Date:</strong> February 2025</li>
            </ul>
        `
    },
    "full-moon-celebration": {
        title: "In C-60th Birthday Full Moon Celebration / FEEL KIYOMIZUDERA",
        date: "November 19, 2024",
        image: "/img/top/movie_ttl2.png",
        content: `
            <h2>Special Full Moon Celebration</h2>
            <p>Join us for a special celebration under the full moon, commemorating 60 years of spiritual practice and community gathering at Kiyomizu-dera.</p>
            
            <h3>Event Highlights</h3>
            <ul>
                <li>Traditional moon viewing ceremony</li>
                <li>Special prayers and blessings</li>
                <li>Cultural performances</li>
                <li>Tea ceremony demonstration</li>
            </ul>
        `
    }
};

export async function getStaticPaths() {
    return Object.keys(newsDatabase).map(slug => ({
        params: { slug }
    }));
}

const { slug } = Astro.params;
const newsData = newsDatabase[slug as keyof typeof newsDatabase];

if (!newsData) {
    return Astro.redirect('/news');
}
---

<BaseLayout 
    title={`${newsData.title} | KIYOMIZU-DERA TEMPLE`}
    description={`Read more about: ${newsData.title}`}
    pageClass="page-sub page-news-detail"
>
    <div id="main">
        <section id="head" class="section1_1">
            <div class="breadcrumb">
                <a href="/">HOME</a> &gt; <a href="/news">NEWS</a> &gt; <span>News Detail</span>
            </div>
            <h1>{newsData.title}</h1>
        </section>
        
        <section class="news-detail-content">
            <div class="section_wrap">
                <article class="news-article">
                    <div class="news-meta">
                        <p class="news-date">{newsData.date}</p>
                    </div>
                    
                    <div class="news-image">
                        <img src={newsData.image} alt={newsData.title} style="width: 100%; max-width: 600px; height: auto;">
                    </div>
                    
                    <div class="news-content" set:html={newsData.content}>
                    </div>
                    
                    <div class="news-navigation">
                        <a href="/news" class="back-to-news">← Back to News List</a>
                    </div>
                </article>
            </div>
        </section>
    </div>
</BaseLayout>
